import {history} from 'umi';

module.exports = class AuthService {
  checkAuth(code) {
    try {
      console.log('checkAuth');
      return code === 'auth-code-for-test';
    } catch (err) {
      console.log(err);
      history.push('/user/login');
      return null;
    }
  }
};
